import { applyMiddleware, createStore, compose } from "redux"
import reducer from "./reducer"
import thunk from "redux-thunk"

// 开启redux-devtools
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
export default createStore(reducer, composeEnhancers(applyMiddleware(thunk)))

// export default createStore(reducer,applyMiddleware(thunk)); // 旧版的
